from django.urls import path
from .views.configViews.prefixConfigView import *
from .views.configViews.basicDimensionConfigView import *
from .views.configViews.dimensionConfigView import *
from .views.configViews.unitConfigView import *
from .views.configViews.quantityConfigView import *
from .views.configViews.unitSetConfigView import *
from .views.prefixView import *
from .views.basicDimensionView import *
from .views.dimensionView import *
from .views.unitView import *
from .views.quantityView import *
from .views.unitSetView import *
from .views.optionRelatedView import *
from .views.unitConversionRelatedView import *

app_name = 'unit_management'

urlpatterns = [
    # 配置逻辑
    path("prefix/show-config", PrefixConfigView.as_view(),
         name="show_prefix_config"),
    path("prefix/create-config", PrefixCreateConfigView.as_view(),
         name="prefix_create_config"),
    path("prefix/modify-config", PrefixModifyInfoConfigView.as_view(),
         name="prefix_modify_config"),
    path("prefix/info-config", PrefixInfoConfigView.as_view(),
         name="prefix_info_config"),
    path("basic-dimension/show-config", BasicDimensionConfigView.as_view(),
         name="show_basic_dimension_config"),
    path("basic-dimension/create-config", BasicDimensionCreateConfigView.as_view(),
         name="basic_dimension_create_config"),
    path("basic-dimension/modify-config", BasicDimensionModifyInfoConfigView.as_view(),
         name="basic_dimension_modify_config"),
    path("basic-dimension/info-config", BasicDimensionInfoConfigView.as_view(),
         name="basic_dimension_info_config"),
    path("dimension/show-config", DimensionConfigView.as_view(),
         name="show_dimension_config"),
    path("dimension/create-config", DimensionCreateConfigView.as_view(),
         name="dimension_create_config"),
    path("dimension/modify-config", DimensionModifyInfoConfigView.as_view(),
         name="dimension_modify_config"),
    path("dimension/info-config", DimensionInfoConfigView.as_view(),
         name="dimension_info_config"),
    path("unit/show-config", UnitConfigView.as_view(), name="show_unit_config"),
    path("unit/create-config", UnitCreateConfigView.as_view(),
         name="unit_create_config"),
    path("unit/modify-config", UnitModifyConfigView.as_view(),
         name="unit_modify_config"),
    path("unit/info-config", UnitInfoConfigView.as_view(), name="unit_info_config"),
    path("quantity/show-config", QuantityConfigView.as_view(),
         name="show_quantity_config"),
    path("quantity/create-config", QuantityCreateConfigView.as_view(),
         name="quantity_create_config"),
    path("quantity/modify-config", QuantityModifyConfigView.as_view(),
         name="quantity_modify_config"),
    path("quantity/info-config", QuantityInfoConfigView.as_view(),
         name="quantity_info_config"),
    path("quantity/quantity-unit-config",
         QuantityUnitConfigView.as_view(), name="quantity_unit_config"),
     path("unit-set/show-config", UnitSetConfigView.as_view(),
         name="show_unit_set_config"),
     path("unit-set/create-config", UnitSetCreateConfigView.as_view(),
           name="unit_set_create_config"),
     path("unit-set/modify-config", UnitSetModifyConfigView.as_view(),
               name="unit_set_modify_config"),
     path("unit-set/info-config", UnitSetInfoConfigView.as_view(),
                   name="unit_set_info_config"),
     




    # 业务逻辑
    path("prefix", PrefixView.as_view(), name="prefix"),
    path("prefix/<str:uuid>", PrefixInfoView.as_view(), name="prefix_info"),
    path("basic-dimension", BasicDimensionView.as_view(), name="basic_dimension"),
    path("basic-dimension/<str:uuid>",
         BasicDimensionInfoView.as_view(), name="basic_dimension_info"),
    path("dimension", DimensionView.as_view(), name="dimension"),
    path("dimension/<str:uuid>", DimensionInfoView.as_view(), name="dimension_info"),
    path("unit", UnitView.as_view(), name="unit"),
    path("unit/<str:uuid>", UnitInfoView.as_view(), name="unit_info"),
    path("quantity", QuantityView.as_view(), name="quantity"),
    path("quantity/<str:uuid>", QuantityInfoView.as_view(), name="quantity_info"),
    path("quantity/<str:uuid>/quantity-unit",
         QuantityUnitView.as_view(), name="quantity_unit"),
     path("unit-set", UnitSetView.as_view(), name="unit_set"),
     path("unit-set/<str:uuid>", UnitSetInfoView.as_view(), name="unit_set_info"),

    # 选项逻辑
    path("options/unit", UnitOption.as_view(), name="unit_option"),
    path("options/quantity-dimension-unit", QuantityDimensionUnitOption.as_view(),
         name="quantity_dimension_unit_option"),
    path("options/all-available-unit", AllAvailableUnitOption.as_view(),
         name="all_available_unit_option"),
    
        # 单位转换接口
    path("unit-conversion/quantity-select-option", QuantitySelectView.as_view(), name="quantity_select"),
    path("unit-conversion/unit-symbol-select-option", UnitSymbolSelectView.as_view(), name="unit_symbol_select"),
    path("unit-conversion", UnitConversionView.as_view(), name="unit_conversion"),
]
